﻿<div bsModal #createOrEditModal="bs-modal" (onShown)="onShown()" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="createOrEditModal" aria-hidden="true" [config]="{backdrop: 'static', keyboard: !saving}">
    <div class="modal-dialog modal-lg">
        <div class="modal-content">
            <form *ngIf="active" #userForm="ngForm" novalidate (ngSubmit)="save()" autocomplete="off">
                <div class="modal-header">
                    <h4 class="modal-title">
                        <span *ngIf="formData.id">编辑</span>
                        <span *ngIf="!formData.id">新建</span>
                    </h4>
                    <button type="button" class="close" (click)="close()" [attr.aria-label]="l('Close')" [disabled]="saving">
                        <span aria-hidden="true">&times;</span>
                    </button>
                </div>
                <div class="modal-body">
                    <tabset class="tab-container tabbable-line">
                        <tab heading="任务信息" customClass="m-tabs__item">
                            <div class="row">
                                <div class="col-sm-6">
                                    <div class="form-group">
                                        <label for="code">任务号 *</label>
                                        <input id="code" #codeInput="ngModel" class="form-control" type="text" name="code" [(ngModel)]="formData.taskNumber" required maxlength="32">
                                        <validation-messages [formCtrl]="codeInput"></validation-messages>
                                    </div>
                                </div>
                                <div class="col-sm-6">
                                    <div class="form-group">
                                        <label for="name">编码 *</label>
                                        <input id="name" #nameInput="ngModel" type="text" name="name" class="form-control" [(ngModel)]="formData.serialNumber" maxlength="32">
                                        <validation-messages [formCtrl]="nameInput"></validation-messages>
                                    </div>
                                </div>
                            </div>
                            <div class="row">
                                <div class="col-sm-6">
                                    <div class="form-group">
                                        <label for="standard">名称 *</label>
                                        <input id="standard" #standardInput="ngModel" type="text" name="standard" class="form-control" [(ngModel)]="formData.name" required maxlength="256"/>
                                        <validation-messages [formCtrl]="standardInput"></validation-messages>
                                    </div>
                                </div>
                                <div class="col-sm-6">
                                    <div class="form-group">
                                        <label for="specification">标准 *</label>
                                        <input id="specification" #specificationInput="ngModel" type="text" name="specification" class="form-control" [(ngModel)]="formData.field_e" maxlength="24">
                                        <validation-messages [formCtrl]="specificationInput"></validation-messages>
                                    </div>
                                </div>
                            </div>
                            <div class="row">
                                <div class="col-sm-6">
                                    <div class="form-group">
                                        <label for="material">规格 *</label>
                                        <input id="material" #materialInput="ngModel" type="text" name="material" class="form-control" [(ngModel)]="formData.field_f" required maxlength="32">
                                        <validation-messages [formCtrl]="materialInput"></validation-messages>
                                    </div>
                                </div>
                                <div class="col-sm-6">
                                    <div class="form-group">
                                        <label for="price">材料 *</label>
                                        <input id="price" #priceInput="ngModel" type="text" name="price" class="form-control" [(ngModel)]="formData.field_g" required maxlength="32">
                                        <validation-messages [formCtrl]="priceInput"></validation-messages>
                                    </div>
                                </div>
                            </div>
                            <div class="row">
                                    <div class="col-sm-6">
                                        <div class="form-group">
                                            <label for="material">价格 *</label>
                                            <input id="material" #materialInput="ngModel" type="text" name="material" class="form-control" [(ngModel)]="formData.field_h" required maxlength="32">
                                            <validation-messages [formCtrl]="materialInput"></validation-messages>
                                        </div>
                                    </div>
                                    <div class="col-sm-6">
                                        <div class="form-group">
                                            <label for="price">库存数量 *</label>
                                            <input id="price" #priceInput="ngModel" type="text" name="quantity" class="form-control" [(ngModel)]="formData.field_d" required maxlength="32">
                                            <validation-messages [formCtrl]="priceInput"></validation-messages>
                                        </div>
                                    </div>
                            </div>
                        </tab>
                    </tabset>
                </div>
                <div class="modal-footer">
                    <button [disabled]="saving" type="button" class="btn btn-default" (click)="close()">{{"Close" | localize}}</button>
                    <!--<button type="submit" class="btn btn-primary" [disabled]="!userForm.form.valid" [buttonBusy]="saving" [busyText]="l('SavingWithThreeDot')"><i class="fa fa-save"></i> <span>{{"Save" | localize}}</span></button>-->
                </div>
            </form>
        </div>
    </div>
</div>
